package com.hgw.imsever.service;

import com.hgw.imsever.mapper.UserGroupMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class UserGroupService {

    @Autowired
    private UserGroupMapper userGroupMapper;

    /**
     *  获取群组{groupId}所有在线用户的id集合
     * @param groupId
     * @return
     */
    public List<String> queryAliveUsersByGroupId(String groupId) {
        return userGroupMapper.getUserIdsByGroupId(groupId);
    }
}
